<template>
	<view class="bigBoxImg">
		<image style="width: 100%; height: 100%;" mode="scaleToFill" src="/static/icon/OneDrive_10_11-16-2021/2x/bg_pic03@2x.png"></image>
		<view class="miaoBox">
			<view class="miaoBoxMin">
				<view class="miaoBoxMinTitle">{{ i18n.ctwfont9 }}</view>
				<view class="miaoBoxMinText">
					{{ i18n.ctwfont10 }}
				</view>
				<view class="swiperBox">
					<view class="swiperBoxImg" v-for="(item, index) in imgList" :key="index">
						<image @tap="yulan(item)" style="width: 100%; height: 100%;" mode="scaleToFill" :src="item"></image>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	data: function() {
		return {
			// imgList: [
			// 	'/static/icon/OneDrive_10_11-16-2021/2x/pic_10@2x.png',
			// 	'/static/icon/OneDrive_10_11-16-2021/2x/pic_09@2x.png',
			// 	'/static/icon/OneDrive_10_11-16-2021/2x/pic_16@2x.png',
			// 	'/static/icon/OneDrive_10_11-16-2021/2x/pic_13@2x.png',
			// 	'/static/icon/OneDrive_10_11-16-2021/2x/pic_15@2x.png',
			// 	'/static/icon/OneDrive_10_11-16-2021/2x/pic_12@2x.png',
			// 	'/static/icon/OneDrive_10_11-16-2021/2x/pic_14@2x.png',
			// 	'/static/icon/OneDrive_10_11-16-2021/2x/pic_11@2x.png'
			// ]
			imgList: [
				'https://ctwcms.oss-ap-southeast-1.aliyuncs.com/web/ctw_markets/foshan/foshan_2.jpg',
				'https://ctwcms.oss-ap-southeast-1.aliyuncs.com/web/ctw_markets/foshan/foshan_3.jpg',
				'https://ctwcms.oss-ap-southeast-1.aliyuncs.com/web/ctw_markets/foshan/foshan_4.jpg',
				'https://ctwcms.oss-ap-southeast-1.aliyuncs.com/web/ctw_markets/foshan/foshan_5.jpg',
				'https://ctwcms.oss-ap-southeast-1.aliyuncs.com/web/ctw_markets/foshan/foshan_6.jpg',
				'https://ctwcms.oss-ap-southeast-1.aliyuncs.com/web/ctw_markets/foshan/foshan_7.jpg',
				'https://ctwcms.oss-ap-southeast-1.aliyuncs.com/web/ctw_markets/foshan/foshan_8.jpg',
				'https://ctwcms.oss-ap-southeast-1.aliyuncs.com/web/ctw_markets/foshan/foshan_9.jpg'
			]
		};
	},
	computed: {
		i18n() {
			return this.$t('productIntroduction');
		}
	},
	methods: {
		// 预览
		yulan(url) {
			if (url) {
				uni.previewImage({
					current: url,
					urls: this.imgList,
					success: res => {
						console.log(res);
					},
					fail: err => {
						console.log(err);
					}
				});
				// void plus.nativeUI.previewImage([url]); // 预览
			}
		}
	}
};
</script>

<style lang="scss" scoped>
.bigBoxImg {
	position: relative;
	width: 750rpx;
	height: 650px;
	.miaoBox {
		position: absolute;
		top: 20px;
		left: 50%;
		transform: translateX(-50%);
		width: 94%;
		background-color: #f1f1f1;
		.miaoBoxMin {
			padding: 20px 15px;
			box-sizing: border-box;
			.miaoBoxMinTitle {
				text-align: center;
				font-size: $uni-font-size-custom-e;
				color: #CD001B;
				font-weight: 700;
				margin-bottom: 5px;
			}
			.miaoBoxMinText {
				padding: 0 10px;
				font-size: $uni-font-size-custom-d;
				line-height: 16px;
				color: #CD001B;
				font-weight: 700;
				margin-bottom: 10px;
				word-break: break-all; // 强制换行
			}
			.swiperBox {
				display: flex;
				justify-content: space-around;
				flex-wrap: wrap;
				// height: 360px;
				// overflow: scroll;
				.swiperBoxImg {
					padding-bottom: 10px;
					box-sizing: border-box;
					width: 305rpx;
					height: 100px;
				}
			}
		}
	}
}
</style>
